public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree=new BinaryTree();
       BinaryTree.TreeNode tree =binaryTree.createTree();
        System.out.println("前序遍历");

        binaryTree.preOder(tree);

        System.out.println("");
        System.out.println("中序遍历");

        binaryTree.Oder(tree);
        System.out.println("");
        System.out.println("后序遍历");

        binaryTree.postOder(tree);

        int size=binaryTree.size(tree);

        System.out.println("");
        System.out.println("结点个数为: "+size);
        int LeafNode=binaryTree.getLeafNodeCount(tree);
        System.out.println("叶子结点个数为: "+LeafNode);
        int KNodeCount=binaryTree.getKNodeCount(tree,4);
        System.out.println("第4层结点的个数为："+KNodeCount);
        int Height=binaryTree.getHeight(tree);
        System.out.println("深度为： "+Height);
        BinaryTree.TreeNode f =binaryTree.find(tree,'A');
        System.out.println(f.val);
    }
}
